import request from "@/framework/axios";

/**
 * 获取任务列表信息
 * @param take
 * @returns
 */
export function getTaskList(take = 10) {
  return request.get("/TaskInfo/GetTaskList", {
    params: { take },
  });
}
/**
 * 获取任务列表信息
 * @param take
 * @returns
 */
export function getTaskInfo(taskId) {
  return request.get(`/TaskInfo/GetInfo/${taskId}`);
}

/**
 * 获取任务列表信息
 * @param take
 * @returns
 */
export function getTaskExtInfo(extId, taskId, searchDto = {}) {
  return request.post(`/TaskInfo/GetExtInfo/${taskId}`, searchDto, {
    params: { extId },
  });
}

export function getTaskLogs(taskId, searchDto = {}) {
  return request.post(`/TaskInfo/GetLogs/${taskId}`, searchDto);
}
